using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._PairwiseOverlay
{
    /// <summary>
    /// <para>Pairwise Intersect</para>
    /// <para>Computes a pairwise intersection of the input features. Features or portions of features that overlap between the input feature layers or feature classes are written to the output feature class. Pairwise intersection refers to selecting one feature from the first input and intersecting it with the features in the second input that it overlaps.</para>
    /// <para>计算输入要素的成对交集。输入要素图层或要素类之间重叠的要素或要素部分将写入输出要素类。成对相交是指从第一个输入中选择一个要素，并将其与第二个输入中重叠的要素相交。</para>
    /// </summary>    
    [DisplayName("Pairwise Intersect")]
    public class PairwiseIntersect : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PairwiseIntersect()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input feature classes or layers to intersect. Only two inputs are allowed.</para>
        /// <para>要相交的输入要素类或图层。只允许两个输入。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class.</para>
        /// <para>输出要素类。</para>
        /// </param>
        public PairwiseIntersect(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Pairwise Intersect";

        public override string CallName => "analysis.PairwiseIntersect";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "maintainCurveSegments", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "parallelProcessingFactor", "qualifiedFieldNames"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _join_attributes.GetGPValue(), _cluster_tolerance, _output_type.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input feature classes or layers to intersect. Only two inputs are allowed.</para>
        /// <para>要相交的输入要素类或图层。只允许两个输入。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class.</para>
        /// <para>输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Join Attributes</para>
        /// <para><xdoc>
        ///   <para>Specifies which attributes from the input features will be transferred to the output feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>All attributes—All the attributes from the input features will be transferred to the output feature class. This is the default.</bullet_item><para/>
        ///     <bullet_item>All attributes except feature IDs—All the attributes except the FID from the input features will be transferred to the output feature class.</bullet_item><para/>
        ///     <bullet_item>Only feature IDs—Only the FID field from the input features will be transferred to the output feature class.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入要素中的哪些属性将传输到输出要素类。</para>
        ///   <bulletList>
        ///     <bullet_item>所有属性—输入要素中的所有属性都将传输到输出要素类。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>除要素 ID 之外的所有属性—输入要素中除 FID 之外的所有属性都将传输到输出要素类。</bullet_item><para/>
        ///     <bullet_item>仅要素 ID - 仅将输入要素中的 FID 字段传输到输出要素类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Join Attributes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _join_attributes_value _join_attributes { get; set; } = _join_attributes_value._ALL;

        public enum _join_attributes_value
        {
            /// <summary>
            /// <para>All attributes except feature IDs</para>
            /// <para>All attributes except feature IDs—All the attributes except the FID from the input features will be transferred to the output feature class.</para>
            /// <para>除要素 ID 之外的所有属性—输入要素中除 FID 之外的所有属性都将传输到输出要素类。</para>
            /// </summary>
            [Description("All attributes except feature IDs")]
            [GPEnumValue("NO_FID")]
            _NO_FID,

            /// <summary>
            /// <para>Only feature IDs</para>
            /// <para>Only feature IDs—Only the FID field from the input features will be transferred to the output feature class.</para>
            /// <para>仅要素 ID - 仅将输入要素中的 FID 字段传输到输出要素类。</para>
            /// </summary>
            [Description("Only feature IDs")]
            [GPEnumValue("ONLY_FID")]
            _ONLY_FID,

            /// <summary>
            /// <para>All attributes</para>
            /// <para>All attributes—All the attributes from the input features will be transferred to the output feature class. This is the default.</para>
            /// <para>所有属性—输入要素中的所有属性都将传输到输出要素类。这是默认设置。</para>
            /// </summary>
            [Description("All attributes")]
            [GPEnumValue("ALL")]
            _ALL,

        }

        /// <summary>
        /// <para>XY Tolerance</para>
        /// <para><xdoc>
        ///   <para>The minimum distance separating all feature coordinates (nodes and vertices) as well as the distance a coordinate can move in x or y (or both).</para>
        ///   <para>Changing this parameter's value may cause failure or unexpected results. It is recommended that this parameter not be modified. It has been removed from view in the tool dialog. By default, the input feature class's spatial reference x,y tolerance property is used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>分隔所有要素坐标（节点和折点）的最小距离，以及坐标可以在 x 或 y（或两者）中移动的距离。</para>
        ///   <para>更改此参数的值可能会导致失败或意外结果。建议不要修改该参数。它已从工具对话框的视图中删除。默认情况下，将使用输入要素类的空间参考 x，y 容差属性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("XY Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _cluster_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Output Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of intersections to be returned.</para>
        ///   <bulletList>
        ///     <bullet_item>Same as input—The intersections returned will be the same geometry type as the input features with the lowest dimension geometry. If all inputs are polygons, the output feature class will contain polygons. If one or more of the inputs are lines and none of the inputs are points, the output will be lines. If one or more of the inputs are points, the output feature class will contain points. This is the default.</bullet_item><para/>
        ///     <bullet_item>Line—The intersections returned will be line. This is only valid if none of the inputs are points.</bullet_item><para/>
        ///     <bullet_item>Point—The intersections returned will be point. If the inputs are line or polygon, the output will be a multipoint feature class.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要返回的交叉点的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>与输入相同—返回的交点将与具有最低尺寸几何的输入要素的几何类型相同。如果所有输入均为面，则输出要素类将包含面。如果一个或多个输入是线，而没有一个输入是点，则输出将是线。如果一个或多个输入是点，则输出要素类将包含点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>线—返回的交点将为线。仅当所有输入都不是点时，这才有效。</bullet_item><para/>
        ///     <bullet_item>点—返回的交点将为点。如果输入为直线或面，则输出将为多点要素类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _output_type_value _output_type { get; set; } = _output_type_value._INPUT;

        public enum _output_type_value
        {
            /// <summary>
            /// <para>Same as input</para>
            /// <para>Same as input—The intersections returned will be the same geometry type as the input features with the lowest dimension geometry. If all inputs are polygons, the output feature class will contain polygons. If one or more of the inputs are lines and none of the inputs are points, the output will be lines. If one or more of the inputs are points, the output feature class will contain points. This is the default.</para>
            /// <para>与输入相同—返回的交点将与具有最低尺寸几何的输入要素的几何类型相同。如果所有输入均为面，则输出要素类将包含面。如果一个或多个输入是线，而没有一个输入是点，则输出将是线。如果一个或多个输入是点，则输出要素类将包含点。这是默认设置。</para>
            /// </summary>
            [Description("Same as input")]
            [GPEnumValue("INPUT")]
            _INPUT,

            /// <summary>
            /// <para>Line</para>
            /// <para>Line—The intersections returned will be line. This is only valid if none of the inputs are points.</para>
            /// <para>线—返回的交点将为线。仅当所有输入都不是点时，这才有效。</para>
            /// </summary>
            [Description("Line")]
            [GPEnumValue("LINE")]
            _LINE,

            /// <summary>
            /// <para>Point</para>
            /// <para>Point—The intersections returned will be point. If the inputs are line or polygon, the output will be a multipoint feature class.</para>
            /// <para>点—返回的交点将为点。如果输入为直线或面，则输出将为多点要素类。</para>
            /// </summary>
            [Description("Point")]
            [GPEnumValue("POINT")]
            _POINT,

        }

        public PairwiseIntersect SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object parallelProcessingFactor = null, bool? qualifiedFieldNames = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, parallelProcessingFactor: parallelProcessingFactor, qualifiedFieldNames: qualifiedFieldNames);
            return this;
        }

    }

}